<style>
    .fontWeight {
        font-weight: bold;
    }
</style>
<div class="tab-content">
    <div class="box border">
        <div class="box-body big">
            <p><b>收件箱</b> (共 {{messageNumber}} 封，其中 <a ng-click="changeMessageView(3)">未读邮件</a> {{messageNotReadNumber}} 封)</p>
            <div class="row">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="tabbable">
                            <ul class="nav nav-tabs">
                                <li class="{{activeNumber==1?'active':''}}" ng-click="changeMessageView(1)"><a><i class="fa fa-home"></i>全部</a></li>
                                <li class="{{activeNumber==2?'active':''}}" ng-click="changeMessageView(2)"><a><i class="fa fa-envelope"></i>已读</a></li>
                                <li class="{{activeNumber==3?'active':''}}" ng-click="changeMessageView(3)"><a>未读</a></li>
                                <li><a ng-click="deleteMessageByIds(selected)">批量删除</a></li>
                            </ul>
                            <div class="tab-content">
                                <table class="table table-hover">
                                    <thead>
                                    <tr>
                                        <th style="width:5%"><input type="checkbox" ng-click="selectAll($event)" ng-checked="isSelectedAll()"/></th>
                                        <th style="width:5%"><i class="fa fa-envelope"></i></th>
                                        <th style="width:10%" ng-click="col='name';desc=!desc">发信人</th>
                                        <th style="width:45%" ng-click="col='email';desc=!desc">标题</th>
                                        <th style="width:25%" ng-click="col='time';desc=!desc">时间</th>
                                        <th style="width:10%">操作</th>
                                    </tr>
                                    </thead>
                                    <tbody ng-repeat="item in messageInView|orderBy:col:desc">
                                        <tr class="{{item.isRead?'':'fontWeight'}}">
                                            <td style="width:5%">
                                                <input type="checkbox" name="selected" ng-checked="isSelected(item.id)" ng-click="updateSelection($event,item.id)"/>
                                            </td>
                                            <td ng-click="messageContentShowChange($index);changeIsReadById(item.id)" style="width:5%">
                                                <i ng-show="!item.isRead" class="fa fa-envelope-o" style="color:yellowgreen"></i>
                                                <img ng-show="item.isRead" src="assets/img/mail.ico" style="width:13px;height:13px"></img>
                                            </td>
                                            <td ng-click="messageContentShowChange($index);changeIsReadById(item.id)" style="width:10%;">{{messageSenderNameShow(item.fromId)}}</td>
                                            <td ng-click="messageContentShowChange($index);changeIsReadById(item.id)" style="width:45%;" ng-bind="item.title"></td>
                                            <td ng-click="messageContentShowChange($index);changeIsReadById(item.id)" style="width:25%" type="date">{{item.createdDate|date:"yyyy-MM-dd HH:mm:ss"}}</td>
                                            <td style="width:10%">
                                                <div class="row">
                                                    <a ng-show="item.type=='MSG_NORMAL'" ng-click="transmitMessage(item.id)">转发</a>
                                                    <a ng-show="(item.type=='ADD_FRIEND'||item.type=='JOIN_INVITE'||item.type=='JOIN_INVITE_FROM_ORG')&& item.reply==null" ng-click="resolveToAddFriend(item.id)">同意</a>
                                                    <a ng-show="(item.type=='ADD_FRIEND'||item.type=='JOIN_INVITE'||item.type=='JOIN_INVITE_FROM_ORG')&& item.reply==null" ng-click="refuseToAddFriend(item.id)">拒绝</a>
                                                    <a ng-click="deleteMessageById(item.id)">删除</a>
                                                    <i ng-show="item.reply==resolveString" class="fa fa-check" style="color:mediumspringgreen"></i>
                                                    <i ng-show="item.reply==rejectString" class="fa fa-close" style="color:red"></i>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr ng-show="messageContentShow($index)" style="background-color: lightgoldenrodyellow">
                                            <td style="width:5%"></td>
                                            <td style="width:5%"></td>
                                            <td colspan="3" rowspan="2" ng-bind="item.content"></td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
